{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# python notebook for Make Your Own Neural Network\n",
    "# working with the MNIST data set\n",
    "# this code demonstrates rotating the training images to create more examples\n",
    "#\n",
    "# (c) Tariq Rashid, 2016\n",
    "# license is GPLv2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import numpy\n",
    "import matplotlib.pyplot\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# scipy.ndimage for rotating image arrays\n",
    "import scipy.ndimage"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# open the CSV file and read its contents into a list\n",
    "data_file = open(\"mnist_dataset/mnist_train_100.csv\", 'r')\n",
    "data_list = data_file.readlines()\n",
    "data_file.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# which record will be use\n",
    "record = 6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# scale input to range 0.01 to 1.00\n",
    "all_values = data_list[record].split(',')\n",
    "scaled_input = ((numpy.asfarray(all_values[1:]) / 255.0 * 0.99) + 0.01).reshape(28,28)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.01\n",
      "1.0\n"
     ]
    }
   ],
   "source": [
    "print(numpy.min(scaled_input))\n",
    "print(numpy.max(scaled_input))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x1096f3828>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP4AAAD8CAYAAABXXhlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADOFJREFUeJzt3V+sHPV5xvHnsQ0XDpKBKD6WcE1cVaRVhGW5sqWKXkxE\nm6CqyMgXlKYXkFYhF6aNmpuQCOkcSoWSXiDRiyDkONGhCordSCmkUguJyKiilYuF7QaaA0RqTeIE\nnxgEKL5AcnveXpyxuz7szqx39s9w3u9HWjE7v5md13N4dv7u/BwRApDLhlkXAGD6CD6QEMEHEiL4\nQEIEH0iI4AMJtQq+7dtsv2L7NdtfHFdRACbLo17Ht71B0muSbpX0C0nHJd0VEa+smY4bBYAZiQj3\nG99mi79P0k8i4vWIuCDp25L2D1j4pdf8/Pxl77v2or71W1+Xa5tEfXXaBP8GST/reX+mGgeg4zi5\nByS0qcW8P5e0o+f99mrc+ywsLFwavvbaa1sscvKKoph1CbWob3Rdrk1qX19ZlirLcqhp25zc2yjp\nVa2e3HtD0guS/jgiltZMF6MuA8DobCsGnNwbeYsfEf9r+z5Jz2r1kOHw2tAD6KaRt/hDL4AtPjAT\ndVt8Tu4BCRF8ICGCDyRE8IGECD6QEMEHEiL4QEIEH0iI4AMJEXwgIYIPJETwgYQIPpAQwQcSIvhA\nQgQfSIjgAwkRfCAhgg8kRPCBhAg+kBDBBxIi+EBCbbrQQgc09Vnw0EMP1bb3dm/Wz759+2rbn3nm\nmYFtW7ZsqZ0Xs8MWH0iI4AMJEXwgIYIPJETwgYQIPpAQwQcScpu+622flvSupBVJFyLifRd9bUeb\nZWTXtO7eeeed2vabbrqptv2tt96qbd+4cWNt+4kTJwa23XzzzbXzYrJsKyLcr63tDTwrkoqIeLvl\n5wCYora7+h7DZwCYsrahDUnft33c9mfHURCAyWu7q39LRLxh+yNa/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Z0TEG9V/z0n6rlYPT7pm2facdOkY\n8ZczrucyEXGup9ukQ5L2zrKefp29qkPrcFBntNNYh9MK/nFJv2H7RttXS7pL0tNTWnYj25urb17Z\n/pCkT0p6ebZVSVo91us93nta0j3V8N2Snlo7w5RdVl8VpIsOaPbr8BuSfhwRj/aM69I6fF9901qH\nU7tzr7os8ahWv2wOR8RXprLgIdjeqdWtfGi16/Bvzbo+209KKiR9WNKypHlJ/yDp7yX9mqTXJd0Z\nEe90qL5PaIiOVKdU36DOXl+QdFQzXodtO6NtvXxu2QXy4eQekBDBBxIi+EBCBB9IiOADCRF8ICGC\nDyRE8IGE/g+Bs7ZFb5FVCwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1096bfbe0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot the original image\n",
    "matplotlib.pyplot.imshow(scaled_input, cmap='Greys', interpolation='None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# create rotated variations\n",
    "# rotated anticlockwise by 10 degrees\n",
    "inputs_plus10_img = scipy.ndimage.rotate(scaled_input, 10.0, cval=0.01, order=1, reshape=False)\n",
    "# rotated clockwise by 10 degrees\n",
    "inputs_minus10_img = scipy.ndimage.rotate(scaled_input, -10.0, cval=0.01, order=1, reshape=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.01\n",
      "0.99748795356\n"
     ]
    }
   ],
   "source": [
    "print(numpy.min(inputs_plus10_img))\n",
    "print(numpy.max(inputs_plus10_img))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x10a278dd8>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP4AAAD8CAYAAABXXhlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADiBJREFUeJzt3V2MHfV5x/HfYxuwYouAVvgFTIirULe8reUQI7QVGos0\noCrIVi5cSi9MilAuQhOSGxO48NmoF0kvkOhFECIOMhBI3PCaSKEkoqMKqoBp42VdLxCLLn4JXpbI\nQIwxGPvpxY7d482e/xyf1/E+34+0YnaemZ3HZ/ntnDn/c+Zv7i4AsczpdwMAeo/gAwERfCAggg8E\nRPCBgAg+EFBbwTez683sVTN73cw2dqopAN1lrY7jm9kcSa9LulbS7yVtk3Sju786bTveKAD0ibvb\nTOvbOeOvlvQ7d3/T3Y9I+omktQ0OfuJr06ZNJ31ftS/6m739Vbm3bvSX0k7wL5C0p+77vcU6ABXH\ni3tAQPPa2HefpM/Ufb+sWPcnarXaieVzzjmnjUN2X5Zl/W4hif5aV+XepPb7y/NceZ43tW07L+7N\nlfSapl7ce0vSS5L+zt3Hpm3nrR4DQOvMTN7gxb2Wz/juftTMbpP0rKYuGTZPDz2Aamr5jN/0ATjj\nA32ROuPz4h4QEMEHAiL4QEAEHwiI4AMBEXwgIIIPBETwgYAIPhAQwQcCIvhAQAQfCIjgAwERfCAg\ngg8E1M6tt3AaKLsXQlndbMaPczddRzVxxgcCIvhAQAQfCIjgAwERfCAggg8ERPCBgBjH77OycfTx\n8fFk/d57703WR0ZGkvWNGzcm60NDQ8n6WWedlayjmjjjAwERfCAggg8ERPCBgAg+EBDBBwIi+EBA\nbY3jm9m4pPckHZN0xN1Xd6Kp2aRsnP7o0aPJ+ssvv5ysP/zww8n65ORksr5ixYpkfXBwMFlnHP/0\n1O4beI5Jytz9QCeaAdAb7T7Vtw78DAA91m5oXdKvzGybmd3aiYYAdF+7T/WH3P0tMztPU38Axtz9\n+ekb1Wq1E8tZlinLsjYPC2C6PM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a9FeZiVRnmOz1G8X6SjyG/Z6MtifX+GY2R9Lrkq6V9HtJ2yTd6O6vdv3gTTKz\nNyR93t0P9LsXSTKzv5J0UNKD7n5Fse77kv7g7v9c/PE8193vqFB/m9TERKq9kJjs9auqwGPY7mS0\n7erVGX+1pN+5+5vufkTSTzT1j6wSU4Uufdz9eUnT/witlbSlWN4iaV1Pm6rToD+pIhOpuvt+d99e\nLB+UNCZpmSryGDbor2eT0fbqf/QLJO2p+36v/v8fWRUu6Vdmts3Mbu13Mw0sOj5pSTGL0aI+9zOT\nyk2kWjfZ628kLa7aY9iPyWgrc4argCF3XyXpbyR9vXgqW3VVG4ut3ESqM0z2Ov0x6+tj2K/JaHsV\n/H2SPlP3/bJiXWW4+1vFfyclPaGpy5OqmTCzxdKJa8S3+9zPSdx9sm7apPslfaGf/cw02asq9Bg2\nmoy2F49hr4K/TdLnzOwiMztT0o2Snu7RsUuZ2aeKv7wyswWSviRpR3+7kjR1rVd/vfe0pJuL5Q2S\nnpq+Q4+d1F8RpOO+ov4/hj+StNPd76lbV6XH8E/669Vj2LN37hXDEvdo6o/NZnf/Xk8O3AQzW66p\ns7xraurwH/e7PzN7RFImaUDShKRNkp6U9K+SLpT0pqT17v5uhfpboyYmUu1Rf40me31J0lb1+TFs\ndzLato/PW3aBeHhxDwiI4AMBEXwgIIIPBETwgYAIPhAQwQcCIvhAQP8HeyXrfUIoyAwAAAAASUVO\nRK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x103423cf8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot the +10 degree rotated variation\n",
    "matplotlib.pyplot.imshow(inputs_plus10_img, cmap='Greys', interpolation='None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x10a1de978>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP4AAAD8CAYAAABXXhlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADg5JREFUeJzt3U+MHOWZx/HfY2xAtnEwMfYIDyasFkwEQiZLEBE5VEQ2\nRqsIoxxYhxwgiVAOIRttLsFcpr3aQ7IHJHLIhUyQiYKSbCT+ZNEuJPKWVuySxUpi88cGbIGJ8Z+x\njf8wI8RosJ89TNk7TKbfand1dZfn+X6kETX1VHW91PjXVdVvdb3m7gIQy4JBNwBA/xF8ICCCDwRE\n8IGACD4QEMEHAqoUfDO7w8xeN7M3zez7vWoUgHpZt/34ZrZA0puSbpd0QNI2SRvd/fVZy3GjADAg\n7m5zza9yxL9F0m53f8fdpyT9QtKGNhs/+zMyMvKx35v2Q/vmb/ua3LY62pdSJfirJe2b8fu7xTwA\nDceHe0BACyusu1/Smhm/Dxfz/kKr1To7femll1bYZP2yLBt0E5JoX/ea3DapevvyPFee5x0tW+XD\nvQskvaHpD/cOSnpJ0lfdfdes5bzbbQDonpnJ23y41/UR391PmdkDkp7X9CXD6OzQA2imro/4HW+A\nIz4wEKkjPh/uAQERfCAggg8ERPCBgAg+EBDBBwIi+EBABB8IiOADARF8ICCCDwRE8IGACD4QEMEH\nAiL4QEBVHr2F80DZsxBOnz6drJ86dSpZv/DCC8+5TRg8jvhAQAQfCIjgAwERfCAggg8ERPCBgAg+\nEBD9+Oe5qv30u3fvTtZHRkaS9T179rStbdq0KbnunXfemaxzj0B9OOIDARF8ICCCDwRE8IGACD4Q\nEMEHAiL4QECV+vHNbK+kk5JOS5py91t60Sj0ztTUVLL+3HPPJevPPvtssj45Odm2tn379uS669ev\nT9bpx69P1Rt4TkvK3P14LxoDoD+qnupbD14DQJ9VDa1L+q2ZbTOz+3vRIAD1q3qqf5u7HzSzyzX9\nBrDL3V+YvVCr1To7nWWZsiyruFkAs+V5rjzPO1q2UvDd/WDx3yNm9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bV+u8c1sgaQ3Jd0u6YCkbZI2uvvrtW+8Q2b2lqS/cffjg26LJJnZ5yVNSHrc\n3W8s5v1Q0nvu/i/Fm+dyd3+wQe0bUQcDqfZDYrDXr6sB+7DqYLRV9euIf4uk3e7+jrtPSfqFpv8n\nm8TUoEsfd39B0uw3oQ2SthTTWyTd1ddGzdCmfVJDBlJ190Puvr2YnpC0S9KwGrIP27Svb4PR9usf\n+mpJ+2b8/q7+/3+yKVzSb81sm5ndP+jGtLHyzKAlxShGKwfcnrk0biDVGYO9/l7Sqqbtw0EMRtuY\nI1wD3Obun5H0d5K+XZzKNl3T+mIbN5DqHIO9zt5nA92HgxqMtl/B3y9pzYzfh4t5jeHuB4v/HpH0\npKYvT5pmzMxWSWevEQ8PuD0f4+5HZgyb9Kikzw6yPXMN9qoG7cN2g9H2Yx/2K/jbJP21mV1lZhdK\n2ijpmT5tu5SZLS7eeWVmSyR9SdKrg22VpOlrvZnXe89Iuq+YvlfS07NX6LOPta8I0hlf0eD34U8l\n7XT3R2bMa9I+/Iv29Wsf9u3OvaJb4hFNv9mMuvsP+rLhDpjZ1Zo+yrumhxX7+aDbZ2ZPSMokfVLS\nmKQRSU9J+ldJV0p6R9Ld7n6iQe37gjoYSLVP7Ws32OtLkn6lAe/DqoPRVt4+t+wC8fDhHhAQwQcC\nIvhAQAQfCIjgAwERfCAggg8ERPCBgP4PwUzQC5hMBmYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1033cf5c0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot the +10 degree rotated variation\n",
    "matplotlib.pyplot.imshow(inputs_minus10_img, cmap='Greys', interpolation='None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
